package priv.ln.field_method.exer4;

/**
 * ClassName: MyArraysTest
 * Package: priv.ln.field_method.exer4
 * Description:
 *
 * @Author 辣辣
 * @Create 2024/6/17 19:41
 * @Version 1.0
 */
public class MyArraysTest {
    public static void main(String[] args) {
        int[] arr = new int[]{1,6,4,15,68,45};

        MyArrays arrays = new MyArrays();

        int max = arrays.getMax(arr);
        int min = arrays.getMin(arr);
        int sum = arrays.getSum(arr);
        double avg = arrays.getAverage(arr);
        System.out.println("max:" + max + ", min:" + min +
                ", sum:" + sum + ", avg:" + avg);
        arrays.printArray(arr);

        int[] arr2 = arrays.copyArray(arr);
        arrays.printArray(arr2);

        arrays.reverseArray(arr2);
        arrays.printArray(arr2);

        arrays.sortArray(arr);
        arrays.printArray(arr);

        int index = arrays.searchArray(arr,6);
        System.out.println("index: " + index);

    }
}
